import os, subprocess, sys
succ_seeds = {
    # "vi" : [0, 1, 6, 10],
    # "vi" : [6], 
    # "tr" : [1, 2, 4, 5, 6, 8, -1],
}
if __name__ == '__main__':
    src = sys.argv[1]
    trg = sys.argv[2]
    seeds = succ_seeds[src] if src in succ_seeds else range(2, 20)
    # seeds = [0]
    exp_name = 'Oct6_checksdi'
    exp_id = src + '-' + trg
    for i in seeds:
        subprocess.run([
            "python3", "muse_main.py", 
            "--src_lang", src,
            "--tgt_lang", trg,
            "--src_emb", "data/wiki." + src + ".vec",
            "--tgt_emb", "data/wiki." + trg + ".vec",
            # "--n_refinement", "5",
            "--n_adversarials", "0",
            "--use_sdi", "--seeddict_sdi",
            "--sdi_cutoff", "20000",
            "--max_vocab", "200000",
            # "--n_epochs", "5",
            # "--epoch_size", "1000000",
            # "--map_optimizer", "sgd,lr=0.02",
            # "--dis_optimizer", "sgd,lr=0.02",
            # "--batch_size", "128",
            # "--exp_id", "jul29_renorm",
            "--exp_name", exp_name, 
            "--exp_id", exp_id, 
            "--normalize_embeddings", "center",
            "--seed", str(i),
            # "--load_temp_model", "~/Documents/MI_Tlab/CUWTr/dumped/debug/jul25_19_32/"
            # "--dico_eval", "./datasets/crosslingual/dictionaries/en-es.txt"
            "--cuda", 
            "--export", "",
        ])